package hn.cch.spring_boot_rest_quartz.quartz;

import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.quartz.QuartzJobBean;

import java.util.Date;

public class SpringQuartz extends QuartzJobBean {

    public static Logger logger = LoggerFactory.getLogger(SpringQuartz.class);

    @Override
    protected void executeInternal(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        logger.info("name" + jobExecutionContext.getJobDetail().getKey().getName() + "|date:" + new Date().toString());
    }
}
